package br.com.sig.persistence;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.enterprise.inject.Produces;
import javax.inject.Named;
import javax.persistence.EntityManagerFactory;
import javax.persistence.PersistenceUnit;

import org.jboss.solder.core.ExtensionManaged;

import br.com.sig.presentation.scope.ViewScoped;

@Named
public class PersistenceProvider implements Serializable {


	private static final long serialVersionUID = 1975978915684199793L;
	
	@ExtensionManaged
    @Produces
    @PersistenceUnit
    @ViewScoped
    private EntityManagerFactory entityManagerFactory;	

	@ExtensionManaged
    @Produces
    @PersistenceUnit
    @SessionScoped
    @Session
	private EntityManagerFactory entityManagerFactorySession;
}